import { request } from '@/utils'

export function list(data) {
  return request({
    url: `projectManagement/selectPage`,
    method: 'post',
    data,
  })
}

export function count(data) {
  return request({
    url: `projectManagement/selectProjectTotalCount`,
    method: 'post',
    data,
  })
}

export function listAll(data = {}) {
  return request({
    url: `projectManagement/selectProjectList`,
    method: 'post',
    data,
  })
}

export function hasTaskList(data = {}) {
  return request({
    url: `projectManagement/selectProjectListByTask`,
    method: 'post',
    data,
  })
}

export function info(data) {
  return request({
    url: `projectManagement/selectInfoById`,
    method: 'post',
    data,
  })
}

export function add(data) {
  return request({
    url: `projectManagement/add`,
    method: 'post',
    data,
  })
}

export function addVersion(data) {
  return request({
    url: `projectManagement/addVersion`,
    method: 'post',
    data,
  })
}

export function edit(data) {
  return request({
    url: `projectManagement/update`,
    method: 'put',
    data,
  })
}

export function del(data) {
  return request({
    url: `projectManagement/delete`,
    method: 'delete',
    data,
  })
}

export function versionList(data) {
  return request({
    url: `projectManagement/selectProjectVersionList`,
    method: 'post',
    data,
  })
}

export function devDeptList(params) {
  return request({
    url: `projectManagement/selectDevelopmentGroupList`,
    method: 'get',
    params,
  })
}

export function devPersonList(data) {
  return request({
    url: `projectPerson/selectProjectPersonList`,
    method: 'post',
    data,
  })
}

export function devPersonListPro(data) {
  return request({
    url: `projectPerson/selectProjectPersonListByDept`,
    method: 'post',
    data,
  })
}

export function aboutProject(data) {
  return request({
    url: `projectManagement/aboutProject`,
    method: 'put',
    data,
  })
}

export function aboutDeliver(data) {
  return request({
    url: `projectManagement/aboutDeliver`,
    method: 'put',
    data,
  })
}

export function aboutPerson(data) {
  return request({
    url: `projectManagement/aboutPerson`,
    method: 'put',
    data,
  })
}

export function aboutPersonEdit(data) {
  return request({
    url: `projectManagement/aboutPersonEdit`,
    method: 'put',
    data,
  })
}

export function durationByProjectInfo(data) {
  return request({
    url: `projectDuration/selectDurationByProjectId`,
    method: 'post',
    data,
  })
}

export function durationByProjectEdit(data) {
  return request({
    url: `projectDuration/updateDurationByProjectId`,
    method: 'put',
    data,
  })
}

export function durationByPersonInfo(projectId) {
  return request({
    url: `projectTaskExe/selectlistDuration/${projectId}`,
    method: 'get',
  })
}

export function processRecordAdd(data) {
  return request({
    url: `projectDuration/processDurationRecordsSubmit`,
    method: 'post',
    data,
  })
}

export function processRecordList(data) {
  return request({
    url: `projectDuration/selectProcessDurationPage`,
    method: 'post',
    data,
  })
}

export function rangeDemandList(data) {
  return request({
    url: `demandPool/selectPage`,
    method: 'post',
    data,
  })
}

export function rangeDemandInfo(params) {
  return request({
    url: `demandPool/selectInfoById`,
    method: 'get',
    params,
  })
}

export function rangeDemandAdd(data) {
  return request({
    url: `demandPool/add`,
    method: 'post',
    data,
  })
}

export function rangeDemandEdit(data) {
  return request({
    url: `demandPool/update`,
    method: 'put',
    data,
  })
}

export function rangeDemandDel(params) {
  return request({
    url: `demandPool/delete`,
    method: 'delete',
    params,
  })
}

export function rangeOutputAdd(data) {
  return request({
    url: `demandPool/OutPutRecordsSubmit`,
    method: 'post',
    data,
  })
}

export function rangeOutputList(data) {
  return request({
    url: `demandPool/selectOutPutRecordsPage`,
    method: 'post',
    data,
  })
}

export function customerList(params) {
  return request({
    url: `customersInformation/selectPage`,
    method: 'get',
    params,
  })
}

export function customerInfo(id) {
  return request({
    url: `customersInformation/${id}`,
    method: 'get',
  })
}

export function customerAdd(data) {
  return request({
    url: `customersInformation/add`,
    method: 'post',
    data,
  })
}

export function customerEdit(data) {
  return request({
    url: `customersInformation/update`,
    method: 'put',
    data,
  })
}

export function customerDel(id) {
  return request({
    url: `customersInformation/${id}`,
    method: 'delete',
  })
}

export function customerRecordAdd(data) {
  return request({
    url: `customersInformation/providedInformationSubmit`,
    method: 'post',
    data,
  })
}

export function customerRecordList(data) {
  return request({
    url: `customersInformation/selectProvidedInformationPage`,
    method: 'post',
    data,
  })
}

export function riskList(data) {
  return request({
    url: `riskManagement/selectPage`,
    method: 'post',
    data,
  })
}

export function riskInfo(id) {
  return request({
    url: `riskManagement/${id}`,
    method: 'get',
  })
}

export function riskAdd(data) {
  return request({
    url: `riskManagement/add`,
    method: 'post',
    data,
  })
}

export function riskEdit(data) {
  return request({
    url: `riskManagement/update`,
    method: 'put',
    data,
  })
}

export function riskDel(id) {
  return request({
    url: `riskManagement/${id}`,
    method: 'delete',
  })
}

export function operateList(projectId) {
  return request({
    url: `OMManagement/${projectId}`,
    method: 'get',
  })
}

export function operateAdd(data) {
  return request({
    url: `OMManagement/add`,
    method: 'post',
    data,
  })
}

export function operateEdit(data) {
  return request({
    url: `OMManagement/update`,
    method: 'put',
    data,
  })
}

export function operateDel(id) {
  return request({
    url: `OMManagement/${id}`,
    method: 'delete',
  })
}

export function meetList(projectId) {
  return request({
    url: `meetingRecords/${projectId}`,
    method: 'get',
  })
}

export function meetAdd(data) {
  return request({
    url: `meetingRecords/add`,
    method: 'post',
    data,
  })
}

export function meetEdit(data) {
  return request({
    url: `meetingRecords/update`,
    method: 'put',
    data,
  })
}

export function meetDel(id) {
  return request({
    url: `meetingRecords/delete/${id}`,
    method: 'delete',
  })
}

export function stageList(projectId) {
  return request({
    url: `periodStatus/${projectId}`,
    method: 'get',
  })
}

export function stageAdd(data) {
  return request({
    url: `periodStatus/add`,
    method: 'post',
    data,
  })
}

export function stageEdit(data) {
  return request({
    url: `periodStatus/update`,
    method: 'put',
    data,
  })
}

export function testList(params) {
  return request({
    url: `standardsPeople/getByProjectIdAndType`,
    method: 'get',
    params,
  })
}

export function testSave(code, data) {
  return request({
    url: `standardsPeople/${code}`,
    method: 'post',
    data,
  })
}

export function testProcessInfo(projectId) {
  return request({
    url: `testManagement/firstTest/${projectId}`,
    method: 'get',
  })
}

export function testProcessSave(data) {
  return request({
    url: `testManagement/firstTest`,
    method: 'post',
    data,
  })
}

export function testRecordAdd(data) {
  return request({
    url: `testManagement/testProcess`,
    method: 'post',
    data,
  })
}

export function testRecordList(data) {
  return request({
    url: `testManagement/selectTestProcessPage`,
    method: 'post',
    data,
  })
}

export function logList(params, projectId) {
  return request({
    url: `projectLog/${projectId}`,
    method: 'get',
    params,
  })
}
